package com.chenjie.executor.day19;


/**
 * packageName com.chenjie.executor.day14
 *
 * @author chenjie
 * @version JDK 8
 * @className TicketTask (此处以class为例)
 * @date 2024/5/28
 * @description TODO
 */
public class Task2 implements Runnable {


    @Override
    public void run() {
        synchronized (this){// 添加同步块
            try {
                Thread.sleep(3000L);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
            System.out.println(System.currentTimeMillis()+"人人都是程序员");
        }
        }


    }

